﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace ExtensionForString
{
    public static class ExtensionForString
    {
        public static string ToTitleCase(this string str) 
        {
            if (str != null)
            {
                TextInfo textInformation = new CultureInfo("bg-BG", false).TextInfo;
                return textInformation.ToTitleCase(str);
            }
            else 
            {
                throw new ArgumentNullException("String value is null");
            }
        }
    }
}
